package generated.com.euncet.example;

@javax.persistence.Entity
public abstract class Product {
	//Fields
	
	@javax.persistence.Id
	@javax.persistence.GeneratedValue(strategy=javax.persistence.GenerationType.IDENTITY)
	private Long id;
	
	public long getId() {
		return id;
	}
	
	public void setId(long id) {
		this.id = id;
	}
	
	private String code;
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	private String name;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	private double price;
	
	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	
	//Associations:
	
	//Asociation with class "com.euncet.example.Category" Multiplicity: One
	private Long categoryId;
	
	public com.euncet.example.Category getCategory() {
		return com.euncet.example.dictionaries.CategoryDictionary.getCategoryById(categoryId);
	}

	public void setCategory(com.euncet.example.Category category) {
		this.categoryId = category.getId();
	}
	
	//Methods
	public abstract double getPriceWithTaxes(double taxes);
}
